<?php

class PersonProfileInfo extends BaseEntity{

	public static $type = "PersonProfileInfo";

	function __construct($id = 0){
		parent::__construct($id);
	}
	
	function update($params){
		$this->firstName = empty($params["firstName"]) ? $this->firstName : $params["firstName"];
		$this->lastName = empty($params["lastName"]) ? $this->lastName : $params["lastName"];
		$this->email = empty($params["email"]) ? $this->email : $params["email"];
		$this->interestTags = empty($params["interest"]) ? $this->interestTags : $params["interest"];
		$this->birthDate = empty($params["birthDate"]) ? $this->birthDate : mysqldate($params["birthDate"]);
 		$this->age = empty($params["birthDate"]) ? $this->age : calculateAge($params["birthDate"]);
		$this->gender = empty($params["gender"]) ? $this->gender: $params["gender"];
	 	$this->save(false);
	}
}